/******************************************************************************

	filename :  TilePopupButton.fx
	version  :  0.1
	author   :  Bernardo Z. Cinco Jr.
	date     :  July 19, 2010   
	
	Description:
	 > tile field that is a button.
	 > when clicked, brings up instance of TilePopup.
		

******************************************************************************/

package mythesis.gui.tile;
import javafx.ext.swing.*;
import javafx.scene.*;
import javafx.scene.text.Font;

public class TilePopupButton extends CustomNode
{
    var fonText = Font
    {
        size : 10;
    }
    
    public var strLabel:String = "-def-";
    public var g:Group;
    public var arrAllowedTypes:Boolean[] = [true,  false, false,	// Constant
    										false, false, false,	// Variable
    										false, false, false,	// Game-Def Function
    										false, false, false,	// Game-Def Variable
    										false, false, false];	// Special
    
	public function laman(i:Integer)
	{
	    return g.content[i];
	}
    
    override function create():Node
    {
        g = Group
        {
            content:
            [
				SwingButton
           		{
	           	    text: strLabel;
	           	    height: 20;
	           	    width : 75;
	           	    font  : fonText;
	           	    action: function()
	           	    		{
	           	    		    
	           	    		}
           		} 
            ]
        }
        return g;
    }
}